<template>
	<view class="app-container question" style="height: 100%; width: 100%">
		<view class="question-item" v-for="qitem in questionList" @click="goQuestionDetail(qitem.id)">
			<!-- <view class="question-item-top">
				<u-avatar style="height: 60rpx;" :size="60" :src="qitem.avatar"></u-avatar>
				<view class="question-item-top-right">
					<view class="top-right-name">
						{{qitem.nickname}}
					</view>
					<view class="top-right-name-time">
						{{qitem.createdOn}}
					</view>
				</view>
			</view>
			<view class="question-item-bottom">
				问题标题：{{qitem.title}}
			</view> -->
			<u-cell-item :border-bottom="false" :title="qitem.title"></u-cell-item>
		</view>
	</view>
</template>

<script>
	import * as that from '../../API/index.js'
	export default {
		data() {
			return {
				questionList:[]
			}
		},
		onLoad() {
			this.getDataList()
		},
		methods: {
			goQuestionDetail(id){
				uni.navigateTo({
					url:'../quesetion-detail/quesetion-detail?id=' + id
				})
			},
			getDataList(){
				let item = {
					page:1,
					limit:100 
				}
				that.myQuestionList(item).then(res =>{
					console.log(res)
					this.questionList = res.data
				})
			}
		}
	}
</script>

<style lang="scss">
.u-cell_title {
	color: #000000 !important;
	font-size:16px !important;
}
.question{
	.question-item{
		background-color: $uni-bg-color;
		margin-bottom: $uni-spacing-10;
		background: #f5f5f5;
		// padding: 10rpx;
		border-radius: 10rpx;
		.question-item-top{
			display: flex;
			align-items: center;
			// border-bottom: 1px solid #ebebeb;
			.question-item-top-right{
				margin-left: 10rpx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				padding: 10rpx 0;
			}
			.top-right-name-time{
				font-size: 12px;
			}
		}
		// .question-item-bottom{
		// 	color: #000000;
		// 	font-size: $uni-font-size-16;
		// 	margin-top: $uni-spacing-10;
		// }
	}
}
</style>
